from fastapi import FastAPI

app = FastAPI()


@app.get("/hello")
# 异步处理
async def hello():
    return {"code": 200, "message": "请求成功！", "data": "hello world"}


@app.get('/')
async def index():
    return {"code": 200, "message": "请求成功！", "data": "index"}


if __name__ == '__main__':
    import uvicorn
    uvicorn.run('03_quickstart:app', reload=True)
